package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverCustomMessageEventCategory;
import com.njtoyo.taxi.admin.mapper.master.enums.DriverCustomMessageLinkCategory;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 司机信息表
 * </p>
 *
 * @author Dell
 * @since 2021-10-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="DriverCustomMessage对象", description="司机信息表")
@Accessors(chain = true)
public class DriverCustomMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "司机Id")
    private Long driverId;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "当为0时，content里是一个json对象，固定的格式为{\"main\":{},\"secondary\":{}}。当为1的时候content里面就跟老的消息一样，是纯文字。")
    private Boolean isPlainText;

    @ApiModelProperty(value = "图片")
    private String iconKey;

    @ApiModelProperty(value = "链接")
    private String linkTo;

    @ApiModelProperty(value = "链接类型 0:self[跳转内部页面],1:h5,2:advertise[广告] ")
    private DriverCustomMessageLinkCategory linkCategory;

    @ApiModelProperty(value = "具体事件类型 0:ride_order[行程车费],1:cancel_order[违约金],2:peak_order_reward[司机高峰接单奖励],3:online_red_packet[司机线上接单红包],4:recommend_registration[推荐注册],5recommend_general_activation[推荐激活(激活即产生奖励，非首单需求)],6:recommend_combine_activation[推荐激活奖励(乘客完成首单有额外奖励)],7:recommend_combine_first_order[司机推荐的乘客完成首单],8:marketing_rebate[本地生活返利],9:appointment[预约单开始前提醒],10:withdraw[提现],11:deduct[平台扣钱],12:system[系统通知]")
    private DriverCustomMessageEventCategory eventCategory;

    @ApiModelProperty(value = "外键Id")
    private Long refId;

    @ApiModelProperty(value = "是否已读")
    private Boolean isRead;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;
}
